import socket

addr=('127.0.0.1',18600)

client = socket.socket(
    socket.AF_INET,
    socket.SOCK_DGRAM
)

while True:
    data = input("请输入：")
    if not data:
        break
    client.sendto(bytes(data, 'utf-8'), addr)